home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 4 / QRZ Ham Radio Callsign Database - Volume 4.iso / files / dsp / 56ktools / a5611.tz / a5611 / examples / disp.a56 < prev    next >
Text File  |  1992-08-11  |  936b  |  44 lines

  1. ;
  2. ; disp:    display    the character in the high byte of A1 on    the readout
  3. ;
  4. disp
  5.     move    #~($F<<7),x0    a,y1    ;save a, x0=mask
  6. ;
  7. ;    copy in    the low    nibble
  8. ;
  9.     movep    x:m_pbd,a1        ;get b port contents
  10.     and    x0,a    #$F<<7,x1    ;clear display nibble, x1=mask
  11.     move    y1,b            ;get char
  12.     rep    #16-7            ;shift it down
  13.     lsr    b
  14.     and    x1,b            ;mask nibble
  15.     move    b1,y0            ;and or    it into    b port
  16.     or    y0,a
  17.     movep    a1,x:m_pbd        ;and write back    b port
  18. ;
  19. ;    write out to the display
  20. ;
  21.     bclr    #11,x:<<m_pbd        ;strobe (setup=25, hold=25, pw=50)
  22.     bset    #11,x:<<m_pbd        ;and negate
  23. ;
  24. ;    copy in    the high nibble
  25. ;
  26.     and    x0,a            ;a has port b, clear nibble again
  27.     move    y1,b            ;get char
  28.     rep    #16-7+4            ;shift down the    high nibble
  29.     lsr    b
  30.     and    x1,b            ;mask the nibble
  31.     move    b1,y0            ;and or    into b data
  32.     or    y0,a
  33.     movep    a1,x:m_pbd        ;write back to port
  34. ;
  35. ;    write out to the display
  36. ;
  37.     bclr    #12,x:<<m_pbd        ;assert    the strobe
  38.     bset    #12,x:<<m_pbd        ;and negate
  39. ;
  40. ;    restore    a and return
  41. ;
  42.     move    y1,a
  43.     rts
  44.